 //
//  UIView+HDRepairCodeView.m
//  app
//
//  Created by D on 15/8/31.
//  Copyright (c) 2015年 hdaren. All rights reserved.
//

#import "HDRepairCodeView.h"

@implementation HDRepairCodeView

-(id)initWithModel:(HDRepairListModle *)model
{
    if (self = [super init]) {
        
        self.frame = CGRectMake(0, 0, UBO_WINDOW.width, 42);
        
         CGFloat kContentW = UBO_WINDOW.width - 2*12.0f - 80.0f;
        
        UILabel * nameLab = [[UILabel alloc]initWithFrame:CGRectOf([self.ubo fx:0 ox:12 fy:UB_1_2 oy:-30/2], [self.ubo ow:80 oh:30])];
        nameLab.text = @"维修单号：";
        [nameLab setFont:[UIFont systemFontOfSize:14]];
        [nameLab setTextColor:[XCommon hexStringToColor:kColor_gray_text]];
        [self addSubview:nameLab];
        
        UILabel * codeLab = [[UILabel alloc]initWithFrame:CGRectOf([nameLab.ufo fx:1 fy:0], [self.ubo ow:kContentW oh:30])];
        codeLab.text = model.code;
        [codeLab setFont:[UIFont systemFontOfSize:14]];
        [codeLab setTextColor:[XCommon hexStringToColor:kColor_gray_text]];
        [self addSubview:codeLab];

        
        
    }
    return self;
}

@end
